<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ page import="com.kaisheng.util.IntervalUtil" %>
<%@ page import="com.kaisheng.service.IdeaService" %>
<%@ page import="com.kaisheng.entity.Idea" %>
<%@ page import="com.kaisheng.entity.User" %>

<!DOCTYPE html>
<html lang="zh-CN"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="static/css/bootstrap.min.css">
	<style type="text/css">
		body{
			background-image:url(static/img/bg.png);
		}
	</style>
	<script type="text/javascript" src="static/js/jquery.js"></script>
	<script type="text/javascript" src="static/js/bootstrap.js"></script>
</head>

<body class="body">
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a class="brand" href="#">Kaishengit PMS</a>
			</div>
		</div>
	</div>
	
	
	<div class="container">
	  <div class="row" style="margin-top:60px">
		<div class="span3">
			<div style="padding: 8px 0;" >
				<ul class="nav nav-list">
				  <li class="nav-header"><li class="nav-header" style="font-size:14px">${sessionScope.userProject.project.name }</li>
				  <li class="divider"></li>
				  <li><a href="project.jspx"><i class="icon-home"></i>最新动态</a></li>
				  <li>
					<a href="goal.jspx"><i class="icon-flag"></i>目标</a>
				  </li>
				  <li><a href="document.jspx"><i class="icon-folder-open"></i>资料库</a></li>
				  <li><a href="files.jspx"><i class="icon-file"></i>文件共享</a></li>
				  <li><a href="contact.jspx"><i class="icon-user"></i>联系人</a></li>
				  <li class="active"><a href="idea.jspx"><i class="icon-white icon-fire"></i>想法</a></li>
				  <li><a href="#"><i class="icon-warning-sign"></i>Bug</a></li>
				  <li><a href="set.jspx"><i class="icon-cog"></i>项目设置</a></li>
				</ul>
			</div>
		</div>
		<div class="span9">
			<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
				<li class="active">
					<a href="http://pms.kaishengit.com/idea.html"><i class="icon-fire"></i>想法</a>
				</li>
				<li class="pull-right"><i class="icon-plus"></i><a href="idea.jspx?m=add" class="link-black">发表想法</a></li>
			</ul>
			<div class="wall" style="margin-bottom:20px;">
			
				<blockquote>
					
			
			
		
				<c:forEach items = "${page.result}" var = "idea">
				
				<c:set value="${idea.createtime }" var="time"></c:set>
								<% String time = (String)pageContext.getAttribute("time"); %>
				
			
				  <h4><a style = "padding-top:5px" href="idea.jspx?m=show&id=${idea.id }">${idea.title }</a></h4>
				  <p style="font-size:14px;line-height:1.5;">${idea.content }</p>
						
							<div style="border:1px solid #ddd;padding:5px">
								<div class="row">
									<div class="span1" style = "margin-top:15px">
										  <img alt="" src="idea.jspx?m=showImg&img=${idea.user.pic }">
									 </div>
									 <div class = "span3" style = "margin-top:15px">
									 	<blockquote>
										  <small>${idea.user.name }发布于<%= IntervalUtil.getInterval(time) %></small>
										  <a href="idea.jspx?m=edit&id=${idea.id }" title="编辑"><i class="icon-pencil"></i></a>
										  <a href="idea.jspx?m=del&id=${idea.id }" title="删除"><i class="icon-trash"></i></a>
									 	</blockquote>
									 </div>
								</div>
							</div>		
										  </c:forEach>
									  
						
				<div class="pull-right">		
				
		<!-- 	<h4>	共${page.totalPages }页</h4> -->当前第${page.pageNum }页
			
			
					<c:choose>
			  		<c:when test="${page.pageNum == 1 }">
			  		首页
			  		</c:when>
			  		<c:otherwise>
					  	<a href="ideamain.jspx?p=1">首页</a>
			  		</c:otherwise>
			  	</c:choose>
			  	<c:choose>
			  		<c:when test="${page.pageNum == 1 }">
			  		上一页
			  		</c:when>
			  		<c:otherwise>
					  	<a href="ideamain.jspx?p=${page.pageNum - 1 }">上一页</a>
			  		</c:otherwise>
			  	</c:choose>
			  	<c:choose>
			  		<c:when test="${page.pageNum == page.totalPages }">
			  			下一页
			  		</c:when>
			  		<c:otherwise>
					  	<a href="ideamain.jspx?p=${page.pageNum + 1 }">下一页</a>
			  		</c:otherwise>
			  	</c:choose>
			  	<c:choose>
			  		<c:when test="${page.pageNum == page.totalPages }">
			  			尾页
			  		</c:when>
			  		<c:otherwise>
					  	<a href="ideamain.jspx?p=${page.totalPages}">尾页</a>
			  		</c:otherwise>
  					</c:choose>
  
			</div>
			
		
			
			
			
			
			
			
			
			
			
				
		<!-- 		
				<div class="pagination pull-right">
				  <ul>
					<li><a href="#">Prev</a></li>
					<li class="active">
					  <a href="#">1</a>
					</li>
					<li><a href="#">2</a></li>
					<li><a href="#">3</a></li>
					<li><a href="#">4</a></li>
					<li><a href="#">Next</a></li>
				  </ul>
				</div>
		-->	
				<div class="clear"></div>
			</div>
		</div>
	  </div>
	</div>
	
</body>
</html>

